﻿<%@ Page Title="" Language="C#" MasterPageFile="~/template/Admin.Master" AutoEventWireup="true" CodeBehind="Photo.aspx.cs" Inherits="EmptyWallGallery.FrontEnd.inside.Editor.Gallery.Photo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("a[rel=TopProduct]").fancybox({
                'transitionIn': 'none',
                'transitionOut': 'none',
                'titlePosition': 'over',
                'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
                    return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
                }
            });
        });
    </script>    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ctphTitle" runat="server">
    <h1>Quản lý tác phẩm</h1>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ctphMain" runat="server">
    <div class="form-wrap" style="float: left; width: 98%; margin-right: 20px;">
        <div style="margin-top: 50px; color: #000;">
            <asp:ListView ID="lstPhoto" runat="server" OnPreRender="LstPhotoPreRender">
                <LayoutTemplate>
                    <table runat="server" id="itemPlaceholderContainer" width="100%">
                        <tr>
                            <td style="border: none;">
                                <div runat="server" id="itemPlaceholder">
                                </div>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <div style="width: 140px; float: left; margin-right: 10px;">
                        <div style="border: solid 1px #CCC; width: 130px; height: 100px; margin-top: 5px;overflow: hidden;">
                            <%# WriteImage(Eval("ImageUrl").ToString(), Convert.ToDateTime(Eval("ImageDate").ToString()), Eval("UploadBy").ToString())%>
                        </div>
                        <div style="font-size: 11px; margin-top: 3px; line-height: 16px;">
                            <%# Eval("ViewCount") %>
                            lượt xem - <a href="DeletePhoto.aspx?Id=<%# Eval("ImageID") %>&ReUrl=<%= Server.UrlEncode(Request.RawUrl) %>" onclick="return confirm('Bạn có chắc muốn xóa?')"
                                title="Xóa">Xóa</a>
                            <br />
                            <%# WriteCreateDate(Eval("ImageDate").ToString())%>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:ListView>
            <div class="paging clearfix">
                <asp:DataPager ID="dtPgPhoto" runat="server" PagedControlID="lstPhoto" PageSize="18"
                    QueryStringField="Page" OnPreRender="DtPgPhotoPreRender">
                    <Fields>
                        <asp:NumericPagerField ButtonType="Link" />
                    </Fields>
                </asp:DataPager>
            </div>
        </div>
    </div>
</asp:Content>
